<?php 

header("Content-type: image/png");

$src = imageCreateFrompng('./logo.png'); 


$width = imagesx($src);
$hieght = imagesy($src);


$dst = imageCreateTrueColor($width/2,$hieght/2);


imagecopyresized ( $dst , $src , 0 ,0 , 0 ,0 ,$width/2 , $hieght/2,$width , $hieght);


//输出
imagepng($dst,'./mid-logo.png');  

$dst = imageCreateTrueColor($width/4,$hieght/4);


imagecopyresized ( $dst , $src , 0 ,0 , 0 ,0 ,$width/4 , $hieght/4,$width , $hieght);


//输出
imagepng($dst,'./min-logo.png');  


//销毁
imageDestroy($src);














 ?>